package tpf.designer.pattern.course10.producer_consumer.sample1;

import org.apache.log4j.Logger;
import org.junit.Test;

public class Client {
    public static final Logger LOGGER = Logger.getLogger(Client.class);

    public static void main(String[] args) {
        SyncStack syncStack = new SyncStack(); //定义篮子
        Producer producer = new Producer(syncStack);  //定义生产者
        Consumer consumer = new Consumer(syncStack);  //定义消费者
        new Thread(producer).start();
        new Thread(consumer).start();
    }

    /*@Test
    public void testSample1(){

        SyncStack syncStack = new SyncStack();
        Producer producer = new Producer(syncStack);
        Consumer consumer = new Consumer(syncStack);

        new Thread(producer).start();
        new Thread(consumer).start();

    }*/
}
